package wish.model;

import org.htmlparser.Node;
import org.htmlparser.nodes.RemarkNode;
import org.htmlparser.nodes.TagNode;
import org.htmlparser.nodes.TextNode;

public class TaggerExtractor {

	private static final String TEXT_NODE = "text_node";
	private static final String REMARK_NODE = "remark_node";
	
	public static String extractTag(Node node) {
		
		if (node instanceof TextNode)
			return TEXT_NODE;
		if (node instanceof RemarkNode)
			return REMARK_NODE;
		//is tag node
		
		return ((TagNode)node).getTagName().toLowerCase();
		
	}

	
}
